package com.hb.core.pojo.project.deal.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hb.core.pojo.project.deal.dto.BidCandidateDTO;
import com.hb.core.pojo.project.deal.entity.BidCandidate;
import com.hb.core.pojo.project.deal.entity.BidCandidateSupplier;
import com.hb.core.pojo.project.opening.dto.OpeningBidTenderDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 中标候选人Mapper
 *
 * @author Lix1ang
 * @date 2021-12-24 13:58:14
 */
@Mapper
public interface BidCandidateMapper extends BaseMapper<BidCandidate> {
    /**
     *
     * @Description: 查询标段最后一次发布中标候选人公示的主键id
     * @Author: zhongdl
     * @Date:2022/1/5 16:04
     * @param sectionId:
     * @return: {@link Long }
     **/
    Long getLastBidCandidateId(@Param("sectionId") Long sectionId);
    /**
     *
     * @Description: 查询中标候选人公示列表
     * @Author: zhongdl
     * @Date:2022/1/14 16:56
     * @param sectionId:
     * @return: {@link List< BidCandidate> }
     **/
    List<BidCandidate> listBidCandidate(@Param("sectionId") Long sectionId);

    /**
     * 获取候选人列表（从开标记录表里拉取投标人）
     *
     * @param page
     * @param bidCandidateSupplier
     * @return
     */
    Page<OpeningBidTenderDTO> getCandidate(@Param("page") Page page, @Param("bidCandidateSupplier") BidCandidateSupplier bidCandidateSupplier);
    /**
     *
     * @Description:查询需要推送的中标候选人公示列表
     * @Author: zhongdl
     * @Date:2022/2/23 16:23
     * @return: {@link List< BidCandidateDTO> }
     **/
    List<BidCandidateDTO> listPushBidCandidateDTO();

    /**
     * 根据id查询中标候选人详情
     *
     * @author yuezheng
     * @param id
     * @return com.hb.core.pojo.project.deal.dto.BidCandidateDTO
     * @date 2022/5/7 14:49
     */
    BidCandidateDTO getBidCandidateDTOById(Long id);
}
